package week8;

public class Bicycle extends Transport{
    private boolean isGear;

    public Bicycle(String name, int speed, boolean isGear) {
        super(name, speed);
        this.isGear = isGear;
    }

    public Bicycle() {
    }

    public boolean isGear() {
        return isGear;
    }

    public void setGear(boolean gear) {
        isGear = gear;
    }

    public void showGear(){
        System.out.println(super.getName()+isGear+"齿轮");
    }

    @Override
    public void showInfo(){
        System.out.println("自行车是：" + super.getName());
        showGear();
        System.out.println(super.getName()+"的速度为" + super.getSpeed());
    }
}
